FROM php:8.2-fpm
#//更新软件源
RUN apt update
ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/

RUN apt-get install -yqq libzip-dev zip unzip && docker-php-ext-configure zip && docker-php-ext-install zip 

#RUN chmod +x /usr/local/bin/install-php-extensions && sync &&  install-php-extensions gd

RUN docker-php-ext-install pdo_mysql \
    && docker-php-ext-install bcmath \
    && pecl install -o -f redis && rm -rf /tmp/pear && docker-php-ext-enable redis \
    &&  docker-php-ext-install pcntl 



RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer

RUN apt-get install -y libwebp-dev libjpeg-dev libpng-dev libfreetype6-dev && \
    docker-php-source extract && \
    cd /usr/src/php/ext/gd && docker-php-ext-install gd

RUN pecl install swoole; \
    docker-php-ext-enable swoole;
